package LivenessCheckOfFreeChoiceNet;


public class testDeadLockTree {
	public static void main(String[] args)
	{
		int[][]a1={
				{1,0,1,0},//S1`
				{0,1,0,0},//S2
				{0,1,0,0},//S3
				{0,0,0,1}//S4
		};
		int[][]a2={
				//s->t
			 // T1,T2,T3,T4
				{0,1,0,0},//S1
				{1,0,0,1},//S2
				{0,0,1,1},//S3
				{0,0,1,0}//S4
		};
		int []a3={0,0,0,0};
		FreeChoiceNet p =new FreeChoiceNet(4,4,a1,a2,a3);
		for(int i=1;i<=4;i++)
		{
			for(int j=1;j<=4;j++)
			{
				System.out.print(p.A[i][j]+",  ");
			}
			System.out.println();
		}
		p.findDeadLock(p.DeadLockTree.root);
		p.DeadLockTree.myprint2(p.DeadLockTree.root);
		//System.out.println(p.DeadLockTree.root.firstSon.nextBrother.nextBrother.isAllZero);
		//System.out.println(p.isBreak_Ancestor_All_Zero(p.DeadLockTree.root.firstSon.nextBrother.nextBrother,1));	
		p.cutTree();
		p.DeadLockTree.myprint2(p.DeadLockTree.root);
	
	}
	
}
